package com.erp.erp_dao.ShipmentPlan;

import com.erp.erp_entitys.Purchase.ExportVo;
import com.erp.erp_entitys.Purchase.PurchaseProductVO;
import com.erp.erp_entitys.ShipmentPlan.ShipmentModel;
import com.erp.erp_entitys.ShipmentPlan.ShipmentPlanProduct;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IShipmentPlanProductDAO {
    int deleteByPrimaryKey(Integer id);

    int insert(ShipmentPlanProduct record);

    int insertSelective(ShipmentPlanProduct record);

    ShipmentPlanProduct selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShipmentPlanProduct record);

    int updateByPrimaryKey(ShipmentPlanProduct record);

    List<ShipmentPlanProduct> selectProductBySpId(Integer spId);
    List<ShipmentPlanProduct> selectProductByShipmentPlanId(Integer spId);

    int deleteByIdList(@Param("idList") List<Integer> idList);

    List<ExportVo> selectExportByList(ExportVo vo);

    List<ShipmentPlanProduct> selectExportProductByExIds(@Param("idList") List<Integer> idList);
    /**
     * 根据外销合同号查询采购合同
     * @param salesContractNo
     * @return
     */
    List<PurchaseProductVO> getPurchaseByExportContractNo(String salesContractNo);

    int  deleteByProductId(Integer id);

    /**
     * 根据外销（备货）合同号、产品id查询出运计划中的产品数据信息
     *
     * @return
     */
    int getPlanProduct(ShipmentPlanProduct record );

    /**
     * 根据外销（备货）合同号、产品id查询出运计划中的产品数据信息
     *
     * @return
     */
    int getPlanProductNum(ShipmentPlanProduct record);

    List<ShipmentModel> selectShipmentByCode(String code);
}